from bisect import bisect_left

#离散化一般不会单独考， 会和树状数组一起
def discrete(a):
    #先排序去重，然后二分查找目标
    b = list(set(a))
    b.sort()
    ans = []
    value = list(range(len(b)))
    dic = dict(zip(b, value))
    #for x in a turn x into the index in b
    for x in a:
        ans.append(dic[x])
    return ans

a = list(map(int, input().split()))
print(discrete(a))